<template>
  <div class="user-home">
    <!-- <RouterView /> -->
    <el-container>

      <!-- 菜单 -->
      <el-aside>
        <MenuWrapper :data="NORMAL_USER" />
      </el-aside>

      <!-- 主体 -->
      <el-main>

        <!-- 主体头部 -->
        <div class="my-header">
          <!-- 主体头部上部 -->
          <MyHeaderTop />
          <!-- 水平自定义导航栏 -->
          <MyHeaderBottom />
        </div>

        <!-- 主体内容 -->
        <div class="main-container" :style="{ backgroundColor: route.path === '/SoftwareConfiguration' || route.path === '/ConditionMonitoring' ? '#f1f6ff' : '#fff' }">
          <RouterView />
        </div>

      </el-main>

    </el-container>
  </div>
</template>

<script lang="ts" setup>
import MenuWrapper from "../../components/menu-wrapper/MenuWrapper.vue";
import MyHeaderTop from "../../components/MyHeaderTop/my-header-top.vue";
import MyHeaderBottom from "../../components/MyHeaderBottom/my-header-bottom.vue";
import { NORMAL_USER } from "../../config/project-base/menu";

const route = useRoute()
</script>

<style scoped lang="scss">
.user-home {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;

  .el-header {
    background-color: #020d16;
  }

  .el-container {
    width: 100%;
    height: calc(100vh);
  }

  .el-aside {
    background-color: #001529;
    color: #fff;
    height: 100%;
    width: auto !important;
  }

  .el-main {
    height: 100%;
    padding: 0 !important;
    background-color: #fff;

    .my-header {
      width: 100%;
      height: 84px;
      position: relative;
      z-index: 10;
      background-color: #fff;
    }

    .main-container {
      width: 100;
      height: calc(100% - 84px);
      box-sizing: border-box;
      padding: 20px;
      overflow-y: auto;
    }
  }
}
</style>